package exercise;

class PC extends Computer {
    private String brand;
    //这里IDEA根据继承规则，自动把构造器的调用写好
    //这里也体现：继承设计的基本思想，父类的构造器完成父类属性初始化
    //子类的构造器完成子类属性的初始化
public PC(String cpu, int memory, int hardDisk, String brand){
    super(cpu, memory, hardDisk);
    this.brand = brand;
}
  public String getBrand() {
    return brand;
  }
  public void setBrand(String Brand) {
    this.brand = brand;
  }
  //输出信息
    public void printInfo() {
        System.out.println("PC的信息如下");
        System.out.println(getDetails() + "brand = " + brand);
    }
}
